home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 5404 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  935 b 

  1. Path: castle.nando.net!news
  2. From: xyzzy@nando.net (Andy Philpotts)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Copy with c
  5. Date: 14 Mar 1996 01:14:51 GMT
  6. Organization: Nando.net Public Access
  7. Message-ID: <568.6646T1205T2413@nando.net>
  8. References: <660.6643T24T753@enterprise.net>
  9. NNTP-Posting-Host: grail2813.nando.net
  10. X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
  11.  
  12.  
  13. Mark Smith said:
  14. >How do i get a program to copy a file, that will be in the same
  15.  
  16. Simple question, many answers.  There is no built in way to copy a file in C
  17. (in fact no builtin IO at all in C ).  The "standard" C libraries provide no
  18. copy function but of course you could fabricate this yourself with "open",
  19. "read", "write" and "close".
  20.  
  21. An alternate way is to take advantage of the ability to run an external
  22. program ( copy?) from within "C" ( using the "system" call).
  23.  
  24. It is possible AmigaDOS is richer, but then your code is less portable.
  25.  
  26. --
  27. Andy Philpotts
  28.  
  29.